const mix = require('laravel-mix');

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

mix.js('resources/js/app.js', 'public/js')
    .sass('resources/sass/app.scss', 'public/css')
    .copy('node_modules/editor.md/editormd.js','public/vendor/editor.md/editormd.js')
    .copy('node_modules/editor.md/editormd.min.js','public/vendor/editor.md/editormd.min.js')
    .copyDirectory('node_modules/editor.md/css', 'public/vendor/editor.md/css')
    .copyDirectory('node_modules/editor.md/fonts', 'public/vendor/editor.md/fonts')
    .copyDirectory('node_modules/editor.md/images', 'public/vendor/editor.md/images')
    .copyDirectory('node_modules/editor.md/languages', 'public/vendor/editor.md/languages')
    .copyDirectory('node_modules/editor.md/lib', 'public/vendor/editor.md/lib')
    .copyDirectory('node_modules/editor.md/plugins', 'public/vendor/editor.md/plugins')
    .copyDirectory('node_modules/cropperjs/dist', 'public/vendor/cropperjs')
    .copyDirectory('resources/img', 'public/img')
    .version()
    .sourceMaps();
